home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 106 / EnigmaAmiga106CD.iso / software / utilities / installer / gui api / example / igui_bye.c < prev    next >
Encoding:
C/C++ Source or Header  |  1999-08-27  |  1.4 KB  |  77 lines

  1.  
  2. #include "includes.h"
  3. #include "installergui_data.h"
  4.  
  5. /********************************************************************
  6.  *
  7.  *  DESCRIPTION
  8.  *
  9.  */
  10.  
  11. /********************************************************************
  12.  *
  13.  *  STATIC
  14.  *
  15.  */
  16.  
  17. /********************************************************************
  18.  *
  19.  *  EXTERN
  20.  *
  21.  */
  22.  
  23. /********************************************************************
  24.  *
  25.  *  PUBLIC
  26.  *
  27.  */
  28.  
  29. /********************************************************************
  30.  *
  31.  *  CODE
  32.  *
  33.  */
  34.  
  35. void __asm igui_Bye(register __a0 APTR application,
  36.                     register __a1 char *appname,
  37.                     register __a2 char *defaultdest)
  38. {
  39.   #ifdef DEBUG
  40.   DEBUG_MAKRO
  41.   #endif
  42.  
  43.   {
  44.     struct Application *app = (struct Application *) application;
  45.     char *byetext;
  46.  
  47.     long args[4];
  48.     args[0] = (long) appname;
  49.     args[1] = (long) defaultdest;
  50.  
  51.     if (app->app_GlobalEnv[GENV_LOG] == LOG_FILE)
  52.     {
  53.       args[2] = (long) "\n\nInstallation log: ";
  54.       args[3] = app->app_GlobalEnv[GENV_LOGFILENAME];
  55.     }
  56.     else
  57.     {
  58.       args[2] = args[3] = (long) app->app_Texts[EMPTY];
  59.     }
  60.  
  61.     byetext = sav_StringF2(app->app_Texts[BYE], &args);
  62.     if (byetext)
  63.     {
  64.       if (guistuff_NewContent(app, guistuff_InitSimpleText(byetext)))
  65.       {
  66.         igui_WaitApp(app);
  67.       }
  68.       else { /* NO GUI OBJECT */ }
  69.     }
  70.     else { /* OUT OF MEMORY */ }
  71.  
  72.     // done... leave with an empty panel
  73.     igui_EmptyPanel(app);
  74.   }
  75. }
  76.  
  77.